from wtforms import StringField, IntegerField, DecimalField, ValidationError
from app.validators.base import BaseForm as Form


class WxPayPlaceOrder(Form):
    amount = DecimalField()

    def validate_amount(self, field):
        if field.data < 0:
            raise ValidationError('金额不合法')


class CheckPayStatusForm(Form):
    out_trade_no = StringField(default='')
    amount = DecimalField()
